package com.qf.week2.day1;

public class Warrior extends Hero{
    private double anger;

    public Warrior(String name, int strong, int wisdom, int speed, double attack, double anger) {
        super(name, strong, wisdom, speed, attack);
        this.anger = anger;
    }

    public Warrior() {
    }

    public Warrior(double anger) {
        this.anger = anger;
    }

    public double hit(double anger){
        double attack1 = this.getAttack();
         this.setAttack(attack1 * 0.2);
         anger = this.anger - 20;
        return anger;
    }

    @Override
    public String toString() {
        return "Warrior{" +
                "name='" + getName() + '\'' +
                ", strong=" + getStrong() +
                ", wisdom=" + getWisdom() +
                ", speed=" + getSpeed() +
                ", attack=" + getAttack() +
                ",anger=" + anger +
                '}';
    }
}
